package com.qf.controller;

import com.qf.pojo.User;
import com.qf.service.UserService;
import com.qf.vo.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/order")
public class UserController {
   @Autowired
   UserService userService;
   @RequestMapping("/login")
    public BaseResult login(@RequestBody HttpServletRequest req, User user){
       return userService.login(req,user);
   }
   @RequestMapping("/register")
    public BaseResult register(@RequestBody HttpServletRequest req,User user){
       return userService.register(req,user);
   }
}

